home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
lantimes
/
90_03
/
nodename.c
< prev
next >
Wrap
Text File
|
1989-12-11
|
949b
|
35 lines
/*-------------------------------------------------------------------------*
* nodename.c -- give a name to a network node
*
* This program assigns a mnemonic name to a network node.
* The name must begin with a double backslash.
*
* Compiler: Microsoft C Version 5.0.
*
* Tom Nolan - 7/12/89
*
*-------------------------------------------------------------------------*/
#include "netbios.h"
main(int argc, char **argv)
{
if(argc < 2 || !isnodename(argv[1]))
{
printf("nodename v1.01 T. Nolan - 7/12/89\n"
"usage:\n\n"
"nodename \\\\xxx\n"
"\\\\xxx is a name by which this node is to be known. It\n"
" may be up to 16 characters including the backslashes,\n"
" and must be unique on the network.\n");
exit(1);
}
reset();
if(add_name(argv[1]))
printf("name '%s' successfully added\n", argv[1]);
else
printf("Netbios not running or name rejected\n");
}